import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    active: 0,
    newPhoto: '',
    routerUrl: '/layout/home'
  },
  mutations: {
    // tab切换状态
    newActive(state, value) {
      state.active = value
    },
    // 头像地址
    changeNewPhoto(state, value) {
      state.newPhoto = value
    },
    // 存取路由地址
    getRouterUrl(state, value) {
      state.routerUrl = value
    }
  },
  actions: {},
  modules: {}
})
